<!-- saved from url=(0014)about:internet -->
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Form based and MultiPowUpload based uploading to test file processing script.</title>
	<link rel="stylesheet" href="styles.css">
</head>
<body>
Sample: <b>uploadtest.html</b>&nbsp;&nbsp;<a href="javascript:location.reload(true);"><img border="0" src="images/refresh.png" width="16" height="16">&nbsp;Refresh frame</a>&nbsp;&nbsp;<a target="_parent" href="index.htm"><img border="0" src="images/home.png" width="16" height="16">&nbsp;Examples home</a><br/><br/>
<!-- text below wil be shown if JavaScript disabled at browser -->
<span id="noscriptdiv" style="border:1px  solid #FF0000;display:block;padding:5px;text-align:left; background: #FDF2F2;color:#000;">Active Scripting (JavaScript) should be enabled in your browser for this application to function properly!</span>
<script type="text/javascript">
	document.getElementById('noscriptdiv').style.visibility = 'hidden';
	document.getElementById('noscriptdiv').style.height = 0;
	document.getElementById('noscriptdiv').style.padding = 0;
	document.getElementById('noscriptdiv').style.border = 0;
</script>


Example shows classical Form  based uploading and another with the help of MultiPowUpload. The example  allows you to check whether the server script that accepts files works correct. <br><br>
To run this sample  make the following steps:
            <ul>
<li>Select upload processing  script URL in the drop-down menu or enter a new value</li>
   <li>In the Form below select small       file to upload (size less than 1 KB). </li>
   <li>If the upload works  successfully (server doesn’t send error messages) try to upload a large file  (greater than 30 MB).</li>

              
              <li>If upload doesn’t work  correctly, try to fix the problems. See Troubleshooting section in Help.
              <li>After successful tests  with Form based upload, try to upload the files using MultiPowUpload.
              </ul>
<br>
  <script language="JavaScript">
	
	function mysubmit(type)
	{
		if(document.getElementById("uploadscript").value=='')
		{
			window.alert('Enter upload processing script file name!');
			return false;
		}
		if(type=='flash')
		{
			MultiPowUpload.setParameter("uploadUrl",document.getElementById("uploadscript").value);
		}
		else
		{
			var FormObj = document.getElementById("myform");
			FormObj.action = document.getElementById("uploadscript").value;
			return true;
		}
	}
  </script>
<br>
<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="212"><strong>Upload processing script file:       
    </strong></td>
	<td valign="top">
	<select name="targetUrl" size="1" onChange="javascript: document.getElementById('uploadscript').value=this.value;">
	  <option value="FileProcessingScripts/ASP/ClearASP/uploadfiles.asp">ASP</option>
	  <option selected value="FileProcessingScripts/PHP/uploadfiles.php">PHP</option>	 
	  <option value="FileProcessingScripts/ASP.NET/CSharp/uploadfiles.aspx">ASP.NET C#</option>
	  <option value="FileProcessingScripts/ASP.NET/VBNET/uploadfiles.aspx">ASP.NET VB</option>
	  <option value="FileProcessingScripts/PERL/uploadfiles.pl">Perl</option>
	  <option value="FileProcessingScripts/ColdFusion/uploadfiles.cfm">Cold Fusion</option>
	  <option value="FileProcessingScripts/JSP/uploadfiles.jsp">JSP</option>
	</select>
	</td>
	    <td width="588"><input  size="70" name="uploadscript" id="uploadscript" type="text" value="FileProcessingScripts/PHP/uploadfiles.php" /></td>
  </tr>
</table>
<br>
 <strong><font size="4">Form based upload (Classic):</font></strong>
<form  id="myform" onSubmit="return mysubmit();" enctype="multipart/form-data" action="FileProcessingScripts/PHP/uploadfiles.php" method="POST"> 
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100">Select file:</td>
    <td width="294"><input name="FileData" type="file" /></td>
  </tr>
</table><br>
<input type="submit" value="Upload" />
</form>
<br>
<strong><font size="4">MultiPowUpload:</font></strong><br>
<br>
<!--Default MultiPowUpload should have minimum width=400 and minimum height=180-->
<OBJECT id="MultiPowUpload" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0"
width="400" height="250" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>
<!-- Replace symbols " with the &quot; at all parameters values and 
symbols "&" with the "%26" at URL values or &amp; at other values!
The same parameters values should be set for EMBED object below. -->
<PARAM NAME="FlashVars" VALUE="uploadUrl=FileProcessingScripts/PHP/uploadfiles.php
&useExternalInterface=true
&serialNumber=put your serial number here
">
<PARAM NAME="BGColor" VALUE="#FFFFFF">
<PARAM NAME="Movie" VALUE="ElementITMultiPowUpload.swf">
<PARAM NAME="AllowScriptAccess" VALUE="always">
<PARAM NAME="SWLIVECONNECT" VALUE="true">
<!-- Embed for Netscape,Mozilla/FireFox browsers support. Flashvars parameters are the same.-->
<!-- Replace symbols " with the &quot; at all parameters values and 
symbols "&" with the "%26" at URL values or &amp; at other values! -->
<embed bgcolor="#FFFFFF" id="MultiPowUpload" name="MultiPowUpload" src="ElementITMultiPowUpload.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" allowscriptaccess="always" width="400" height="250" 
flashvars="uploadUrl=FileProcessingScripts/PHP/uploadfiles.php
&useExternalInterface=true
&serialNumber=put your serial number here
">
</embed>
</OBJECT>

<script type="text/javascript">
function MultiPowUpload_onStart()
{
	mysubmit('flash');
}
</script>

<br />
The file uploader doesn’t work? See <a target="_blank" href="http://www.element-it.com/OnlineHelpMulti/MultiPowUpload_Manual_HTML/Troubleshooting.html">here</a> what you need for its proper work. 
<br /><br />
</body>
